import { defineConfig } from 'vite'
import { createVuePlugin } from 'vite-plugin-vue2'
import path from "path";


export default defineConfig({
    plugins:[createVuePlugin()],
    define:{

    },
    resolve:{
        alias:{
            'vue$': 'vue/dist/vue.esm.js',
            '@':path.resolve(__dirname,'./src')
        },
        extensions:['.js','.vue','.jsx','.json','.mjs','.css','.scss']
    },
    server:{
        host:'0.0.0.0',
        proxy:{
            '/api': {
                target: 'http://localhost:8088',
                changeOrigin: true,
                rewrite: (path) => path.replace(/^\/api/, '')
            }
        },
        port:1888,
        open:true
    }
})